package com.request;

import java.io.FileInputStream;
import java.util.Properties;

public class Details {
	Properties properties = null;

	String[] Details = new String[2];

	FileInputStream fileInputStream = null;

	public String[] Config(String port,String system) {
		try {
			properties = new Properties();
			fileInputStream = new FileInputStream("system.properties");
			properties.load(fileInputStream);
			Details[0] = properties.getProperty(port).toString();
			Details[1]=properties.getProperty(system).toString();
		} catch (Exception e) {
			e.printStackTrace();
		}

		return Details;
	}
	public int Thresold()
	{
		try
		{
			properties = new Properties();
			fileInputStream = new FileInputStream("system.properties");
			properties.load(fileInputStream);
		}
		catch (Exception e) {
			e.printStackTrace();
		}
		return Integer.parseInt(properties.getProperty("threshold"));
	}
	public static void main(String[] args) 
	{
		String Details[]=new Details().Config("clientport","routersystem");
		System.out.println(Details[0]);
	}
}
